package com.lun.easy;

public class FindTheHighestAltitude {
	public int largestAltitude(int[] gain) {
		int max = 0, sum = 0;
		for (int num : gain) {
			sum += num;
			if (sum > max)
				max = sum;
		}
		return max;
	}
}
